Skip to content

test: isolate the tests that swap a shared HttpClient into a static seam - #796

Merged
dfa1 merged 1 commit into
mainfrom
test/isolate-default-client-swap
Nov 30, 2026
Merged

dfa1 merged 1 commit into
mainfrom
test/isolate-default-client-swap

Conversation

@dfa1

@dfa1 dfa1 commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Fixes a race that #794 (concurrent unit test classes) introduced: VortexHttpReaderTailFetchTest.defaultClient_followsRedirects could read VortexHttpReader.defaultHttpClient while VortexHttpReaderOpenOverloadTest held a mock in it, and failed with "expected: NORMAL but was: null" (Ubuntu JDK 25, #795's run).

The swapping test is now @Isolated. So is CsvImporterHttpTest, which swaps CsvImporter.httpClient the same way; no other csv test races with it today. Locally, the reader and csv tests ran green 3 times in a row without the Vector API module, the configuration of the failed CI pass.

🤖 Generated with Claude Code

Since unit test classes run concurrently (#794),
VortexHttpReaderTailFetchTest.defaultClient_followsRedirects could read
VortexHttpReader.defaultHttpClient while VortexHttpReaderOpenOverloadTest
held a mock there, and saw the mock's null redirect policy ("expected:
NORMAL but was: null", Ubuntu JDK 25 on #795). The swapping test is now
@isolated, as AGENTS.md says a class needing the JVM to itself is, and
so is CsvImporterHttpTest, which swaps CsvImporter.httpClient the same
way.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dfa1
dfa1 merged commit e92c1fb into main Nov 30, 2026
8 checks passed
@dfa1
dfa1 deleted the test/isolate-default-client-swap branch November 30, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant